﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using System.Windows.Forms;

namespace CoolEngine.Gui.New
{
    public abstract class UpdateableGraphicsDeviceControl:GraphicsDeviceControl, IUpdateable
    {

        protected override void Initialize()
        {
            Application.Idle += delegate
                {
                    throw new NotImplementedException();
                };
        }
        #region IUpdateable Members

        
        public virtual void Update(GameTime gameTime)
        {
            
        }

        public int UpdateOrder
        {
            get { return updateOrder; }
            set
            {
                updateOrder = value;
                EventHandler temp = UpdateOrderChanged;
                if (temp != null)
                {
                    temp(this, EventArgs.Empty);
                }
            }
        }
        private int updateOrder;
        public event EventHandler UpdateOrderChanged;
        protected virtual void OnEnabledChanged(object sender, EventArgs e)
        {

        }

        #endregion
    }
}
